<?php
declare (strict_types = 1);

namespace app\validate;

use think\Validate;

class Users extends Validate
{
    protected $rule = [        
        'username' => 'unique:users|min:3',
        'email'    => 'unique:users',
    ];
    protected $message = [     
        'username.unique' => '对不起，用户名已被使用',
        'username.min'    => '对不起，用户名至少要三个字符',
        'email.unique'    => '对不起，邮箱已被占用',

    ];

    protected $scene = [
        'saveMyProfile' => ['username', 'email'],
    ];

}
